from rest_framework import serializers
from utils.utils import ModelFieldFilter

class BaseSerializer(ModelFieldFilter, serializers.ModelSerializer):
    tenantId = serializers.CharField(required=False, read_only=True)
    updateUserId = serializers.CharField(required=False, read_only=True)
    createUserId = serializers.CharField(required=False, read_only=True)
    create_datetime = serializers.DateTimeField(
        format="%Y-%m-%d %H:%M:%S", required=False, read_only=True
    )
    update_datetime = serializers.DateTimeField(
        format="%Y-%m-%d %H:%M:%S", required=False, read_only=True
    )